#Count为0时从存储中移除，存储列表中没有内容变为空
$execute store result score #count temp run data get entity @s Inventory[{Slot:8b}].components."minecraft:custom_data".bag[$(index)].count
execute if score #count temp matches 1.. run return run scoreboard players reset #count temp
$function dab:system/arrow_bundle/storage/remove_arrow {index:$(index)}
scoreboard players reset #count temp